import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import "./plugins/axios";

Vue.config.productionTip = false;

Vue.filter("imageView", function (value, size) {
  if (!value) return "";
  value = value.toString();
  return value + "?imageView=1&type=webp&thumbnail=" + size + "x0";
});
Vue.filter("unixToDate", function (value) {
  if (!value) return "";

  var d = new Date(value);
  return d.getMonth() + 1 + "月" + d.getDate() + "日更新";
});

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");
